1. Field of the Invention
The present invention relates to techniques for performing garbage collection. More specifically, the present invention relates to a method and system for maximizing throughput for a garbage collector.
2. Related Art
The throughput of a generational garbage collector is highly dependent on various parameters associated with the generational garbage collector, such as the relative sizes of memory regions for different generations and/or the tenuring threshold of objects within the heap. The behavior of the generational garbage collector may additionally be affected by other considerations, such as a maximum pause time during which garbage collection is performed and/or a maximum footprint of the heap.
In particular, a tradeoff between throughput, pause time, and footprint may occur from variations in generation sizes and in the tenuring threshold. For example, a very large young generation may increase throughput at the expense of footprint and pause time. Similarly, the tenuring threshold may affect generation sizes and pause times.
Existing techniques for tuning generational garbage collector performance involve the use of heuristics to adjust generation sizes, tenuring thresholds, and/or other parameters associated with the garbage collector. For example, a heuristic policy for dynamically adjusting generation sizes may try to meet, in order of importance, a pause time goal, a throughput goal, and a maximum footprint goal. Policies for dynamically adapting the tenuring threshold may involve the comparison of relative amounts of time spent on minor and major garbage collections and/or the promotion of enough data out of a particular generation to meet a pause time goal. However, such policies are unable to determine generation sizes and/or tenuring thresholds that maximize and/or optimize garbage collection throughput for a given pause time goal and footprint goal. Hence, generational garbage collector performance may be improved by a comprehensive analysis of the factors affecting throughput, pause time, footprint, and/or other considerations related to garbage collection.